<template>
<!--  -->
      <div >
        <ListItem :list="list" @reduce="reduce"></ListItem>
    
      </div>
</template>

<script>
import ListItem from './Lcomponents/ListItem.vue'
export default {
    data(){
        return{
            list:['苹果','西瓜']
        }
    },
    methods:{
        reduce(index){
          console.log(index,'父级'); //通知父亲
          this.list.splice(index,1)
        }
    },
  components:{
    ListItem
  }
}
</script>

<style>

</style>